console.log("render.js");

const btn1 = document.getElementById("btn1");
const btn2 = document.getElementById("btn2");
const btn3 = document.getElementById("btn3");
const input1 = document.getElementById("input1");

console.log("window: ", window);

btn1.onclick = () => {
    // 预加载脚本，传过来
    console.log(wenzhiApi.version);
    alert(`你点我了！${wenzhiApi.version}`);
}

btn2.onclick = () => {
    wenzhiApi.saveFile(input1.value);
    alert(input1.value);
}

btn3.onclick = async () => {
    let data = await wenzhiApi.readFile();
    alert(data);
}

